package com.bdqn.business.quality.controller;

import com.bdqn.aop.Log;
import com.bdqn.business.quality.service.ClassesService;
import com.bdqn.entity.quality.Classes;
import com.bdqn.response.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/classes")
public class ClassesController {

    @Autowired
    private ClassesService classesService;

    @Log("查询班级列表")
    @RequestMapping(value = "/getClassesList",method = RequestMethod.POST)
    public Result list(@RequestBody Map<String,Object> map){
        return classesService.getClassesList(map);
    }

    @Log("添加班级")
    @RequestMapping(value = "/saveClasses",method = RequestMethod.POST)
    public Result saveClasses(@RequestBody Classes classes) throws Exception {
        return classesService.saveClasses(classes);
    }
}
